<?php
namespace upload;


class upload {
    private $files;

    function __construct($inputName)
    {
        $this->inputName = $inputName;
        $this->files = $_FILES[$inputName];

    }

    public function saveFiles($path)
    {
        $destino = $path . $this->files["name"];
        if (copy($this->files["tmp_name"],$destino)){
            $rtrn = $this->files["name"];
        }else{
            $rtrn = "";
        }

        return $rtrn;
    }
}